package com.mop.sg2.msg.test;

import com.mop.sg2.msg.MsgType;
import com.mop.sg2.msg.base.BaseMsg;

public class RoleInfoMsg extends BaseMsg {

	int level = 0;

	String roleName = null;

	String roleArmyName = null;

	short roleNation = 0;

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleArmyName() {
		return roleArmyName;
	}

	public void setRoleArmyName(String roleArmyName) {
		this.roleArmyName = roleArmyName;
	}

	public short getRoleNation() {
		return roleNation;
	}

	public void setRoleNation(short roleNation) {
		this.roleNation = roleNation;
	}

	@Override
	public void readImpl() {
		this.level = this.readInt();
		this.roleName = this.readString();
		this.roleArmyName = this.readString();
		this.roleNation = this.readShort();
	}

	@Override
	public void writeImpl() {
		this.writeInt(this.level);
		this.writeString(this.roleName);
		this.writeString(this.roleArmyName);
		this.writeShort(this.roleNation);
	}

	@Override
	public short getMsgType() {
		return MsgType.ROLE_INFO;
	}

	@Override
	public String getMsgName() {
		return "ROLE_INFO";
	}

}
